/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.voltor.core;

/**
 *
 * @author alext
 */
public class VoltorEntityFactory {

    public static VoltorEntity createEntity(String type) {
        VoltorEntity entity = new VoltorEntity();

        if (type.equals(VoltorEntity.TYPE_DATABASE)) {
            entity.setType(VoltorEntity.TYPE_DATABASE);
            entity.setClosedEntityImage("/org/voltor/core/resources/Database_16x16.png");
            entity.setOpenedEntityImage("/org/voltor/core/resources/Database_16x16.png");
        } else if (type.equals(VoltorEntity.TYPE_WEBSERVER)) {
            entity.setType(VoltorEntity.TYPE_WEBSERVER);
            entity.setClosedEntityImage("/org/voltor/core/resources/Monitor_16x16.png");
            entity.setOpenedEntityImage("/org/voltor/core/resources/Database_16x16.png");
        }

        return entity;
    }
}
